Previous Book Contents Book Index Next

Inside Macintosh: Programming With the Text Encoding Conversion Manager /
Chapter 3 - Text Encoding Converter Reference / Text Encoding Converter Functions
Investigating Encodings /


TECGetAvailableSniffers

Returns the list of sniffers available in all installed plug-ins.

pascal OSStatus TECGetAvailableSniffers (
                     TextEncoding availableSniffers[], 
                     ItemCount maxAvailableSniffers, 
                     ItemCount *actualAvailableSniffers);
availableSniffers[]
An array composed of text encoding specifications. On output, the TECGetAvailableSniffers function fills the array with the text encoding specifications that the available sniffers currently support. To determine how large an array to allocate, use the function TECCountAvailableSniffers (page 83).
maxAvailableSniffers
The number of text encoding specifications the availableSniffers array can contain.
actualAvailableSniffers
A pointer to a value of type ItemCount. On output, this value indicates the number of text encodings the function returned in the availableSniffers array.
function result
A result code. See "Text Encoding Conversion Manager Result Codes" (page 42) for a list of possible values. If other than noErr, then one of the text conversion plug-ins encountered an error when polled for available sniffers.
DISCUSSION
The TECGetAvailableSniffers function returns the text encoding specifications that can be sniffed in the array you pass to the function as the availableSniffers parameter, eliminating any duplicate information in the process. Consequently, the number of encodings TECGetAvailableSniffers returns in the availableSniffers array may be fewer than the number of elements you allocated for the array based on your call to the function TECCountAvailableSniffers (page 83). TECGetAvailableSniffers tells you the actual number of specifications it returns in the actualAvailableSniffers parameter.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 NOV 1997